<?php
if($_GET['_mod']==1 && isset($_POST['conbtn']))
{
	$maincontent = $_POST['videocode'];
	
	mysql_query("update contentmanagement set videocode='$maincontent'");
		
	header("location: index.php?tc=contentmanagement&_p=6&_s=true");
}
?>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<?php
$q = mysql_fetch_array(mysql_query("select videocode from contentmanagement limit 1"));
?>

<form name="hcont1" action="index.php?tc=contentmanagement&_p=6&_mod=1" method="post">
<table width="98%" align="center" border="0">
<tr>
	<td align="left"><h3>User Agreement & Privacy Policy</h3></td>
    <td align="right" style="color:#900;">
    	<?php
		if($_REQUEST['_s']=="true") { ?><img src="images/information.png" border="0" align="absmiddle" />&nbsp;Updated successfully. <?php }
		?>
    </td>
</tr>    
<tr>
	<td colspan="2">
    	<textarea id="videocode" name="videocode" style="width:100%; height:350px;" ><?php echo $q['videocode'];?></textarea>
        <script type="text/javascript">CKEDITOR.replace( 'videocode',{skin : 'kama'});</script>
	</td>
</tr>
<tr>
	<td colspan="2" align="left">
    	<input type="submit" value="Save" name="conbtn"  /> &nbsp;
        <input type="button" value="Cancel" onClick="window.location='index.php?tc=contentmanagement'" >
	</td>
</tr>
</table>	            
</form>

